package com.lvyq.javaprint;

import com.lvyq.javaprint.constant.ImgConstant;
import com.lvyq.javaprint.view.index.IndexView;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.scene.image.Image;
import javafx.stage.Stage;

/**
 * @author lvyq  暂时不使用fxml进行布局。意在尽可能减少依赖引入从而减小jar包体积。
 * @version 1.0
 * Create by 2024-04-24 15:46
 */
public class MainWinApplication extends Application {


    @Override
    public void start(Stage primaryStage)  {
        //使托盘正常显示
        System.setProperty("java.awt.headless", "false");
        Platform.setImplicitExit(false);

        //创建首页内容
        IndexView.createIndexView(primaryStage);

        Image icon = new Image(ImgConstant.ICON_URL);
        primaryStage.getIcons().add(icon);
        primaryStage.show();

    }

}
